#include "nv_l40_card.h"
#include <mc/core/timer.h>
#include <mc/log.h>
#include <thread>
#include <vector>

namespace dev {

bool nv_l40_card::start() {
    return true;
}

bool nv_l40_card::stop() {
    return true;
}

bool nv_l40_card::replace_dynamic_property(mc::mutable_dict& object, const mc::dict& connector) {
    m_pcie_device.replace_dynamic_property(object, connector);
    return true;
}

bool nv_l40_card::init(mc::mutable_dict& csr_object, const mc::dict& connector) {
    try {
        replace_dynamic_property(csr_object, connector);
        from_variant(csr_object, *this);

    } catch (const std::exception& e) {
        elog("nv_l40_card init failed, exception: ${exception}", ("exception", e.what()));
        return false;
    }
    return true;
}

} // namespace dev

MC_REFLECT(dev::nv_l40_card,
           ((SystemId, "SystemId"))((m_pcie_device, "bmc.dev.PCIeDevice"))((m_pcie_card,
                                                                            "bmc.dev.PCIeCard")))
